<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  <link rel="stylesheet" href="css/fonts/font-awesome.min.css">
  <link rel="stylesheet" href="css/ui-box.css">
  <link rel="stylesheet" href="css/ui-base.css">
  <link rel="stylesheet" href="css/ui-color.css">
  <link rel="stylesheet" href="css/appcan.icon.css">
  <link rel="stylesheet" href="css/appcan.control.css">
  <link rel="stylesheet" href="css/BaggageTrace.css" />
  <link rel="stylesheet" href="css/base.css">

</head>
<style>
  .ls {
    width: calc(100% / 4);
  }

  #__d {
    width: calc(100% / 4);
    position: absolute;
    left: 0;
    bottom: -0.05em;
    transition: left .35s;
  }
</style>

<body class="um-vp bcF8F8F8" ontouchstart>
  <div id="page_0" class="up ub ub-ver bc-bg" tabindex="0">
    <!--header开始-->
    <header id="HEADER">
      <div id="header" class="uh bc-text-head ub bc_head">
        <div class="nav-btn" id="nav-left"></div>
        <h1 class="ut ub-f1 ulev-3 ut-s tx-c cfff" tabindex="0">行李列表</h1>
        <div class="nav-btn nav-bt" id="nav-right"></div>
      </div>
      <div class="fs9">
        <ul id="ulwrap" class="h25 bcFFF bor_bot_E7E7E7">
          <li class="ls bor_rig_D4D4D4 tx-c c6181CA lh15">
            未分拣<span class="dib ml1 h15 w15 serialNumber"><small id="unSoring" class="fs8 lh15"></small></span>
          </li>
          <li class="ls bor_rig_D4D4D4 tx-c c9B9B9B lh15">
            未装机<span class="dib ml1 h15 w15 serialNumber"><small id="unLading" class="fs8 lh15"></small></span>
          </li>
          <li class="ls bor_rig_D4D4D4 tx-c c9B9B9B lh15">
            未到达<span class="dib ml1 h15 w15 serialNumber"><small id="unArrive" class="fs8 lh15"></small></span>
          </li>
          <li class="ls bor_rig_D4D4D4 tx-c c9B9B9B lh15">
            未提取<span class="dib ml1 h15 w15 serialNumber"><small id="unClaim" class="fs8 lh15"></small></span>
          </li>
          <div id="__d" class="bor_bot2_6181CA"></div>
        </ul>
      </div>
    </header>

    <!--header结束-->
    <!--content开始-->
    <div id="flightBaggageListContent" class="ub-f1 tx-l">

    </div>
    <!--content结束-->

  </div>
  <script src="js/appcan.js"></script>
  <script src="js/appcan.control.js"></script>
  <script src="js/jquery-3.1.1.min.js"></script>
  <script src="js/z_API.js"></script>
  <script src="js/talkingdata.js"></script>
</body>
<script>
  var menu = new menu("#ulwrap");
  menu.click(".ls", "#__d", function(index) {
     IC.talkingDataCount("行李服务","16");
    //$($(".serialNumber")[index]).css("display","none");
    appcan.frame.selectMulti("flightBaggageListContent", index);
  });
  appcan.ready(function() {

    var bagStatus = [];
    var unSoring = [];
    var unLading = [];
    var unArrive = [];
    var unClaim = [];
    var bagInfos = JSON.parse(appcan.locStorage.getVal("bagsInfos"));
    for (var a = 0; a < bagInfos.length; a++) {
      var bagObj = bagInfos[a];
      if (bagObj.sortStatus == false) {
        unSoring.push(bagObj);

      }
      if (bagObj.loadStatus == false) {
        unLading.push(bagObj);

      }
      if (bagObj.arrivalStatus == false) {
        unArrive.push(bagObj);

      }
      if (bagObj.claimStatus == false) {
        unClaim.push(bagObj);

      }
    }
    
    if (unSoring.length <=0) {
      $($(".serialNumber")[0]).css("display","none");
    }else{
     $("#unSoring").html("("+unSoring.length+")");
    }
    if (unLading.length <=0) {
      $($(".serialNumber")[1]).css("display","none");
    }else{
     $("#unLading").html("("+unLading.length+")");
    }
    if (unArrive.length <=0) {
      $($(".serialNumber")[2]).css("display","none");
    }else{
     $("#unArrive").html("("+unArrive.length+")");
    }
    if (unClaim.length <=0) {
      $($(".serialNumber")[3]).css("display","none");
    }else{
     $("#unClaim").html("("+unClaim.length+")");
    }


    bagStatus.push(unSoring);
    bagStatus.push(unLading);
    bagStatus.push(unArrive);
    bagStatus.push(unClaim);
    //console.log(bagStatus)
    appcan.locStorage.setVal("bagStatusArr", bagStatus);


    var titHeight = $('#HEADER').css("height");
    var $tabSelect = $(".ls");
    appcan.frame.open({
      id: "flightBaggageListContent",
      url: [{
        inPageName: "unSoring",
        inUrl: "BaggageFlightbaggageListPage_unSorting.html"
      }, {
        inPageName: "unLading",
        inUrl: "BaggageFlightbaggageListPage_unLading.html"
      }, {
        inPageName: "unArrive",
        inUrl: "BaggageFlightbaggageListPage_unArrive.html"
      }, {
        inPageName: "unClaim",
        inUrl: "BaggageFlightbaggageListPage_unClaim.html"
      }],
      top: titHeight,
      left: 0,
      index: 0,
      change: function(err, res) {
        var index = Number(res.multiPopSelectedIndex);
        //$($(".serialNumber")[index]).css("display","none");
        for(var i = 0; i < $tabSelect.length; i++){
          $($tabSelect[i]).css("color","#9B9B9B");
        }
        $($tabSelect[index]).css("color","#6181CA")
        var f = $("#__d").width() * index + "px";
        $("#__d").css("left", f);
      }
    });

  });
  appcan.button(".nav-btn", "btn-act", function() {
      IC.talkingDataCount("行李服务","16");
      appcan.window.close(-1);
  })
</script>

</html>
